# page

A simple password manager using [age](https://github.com/FiloSottile/age) written in POSIX `sh`.

> A [pash](https://github.com/dylanaraps/pash) gpg fork to age.

## Dependencies

* `sh`, `bash`, `zsh` or another shell like UNIX.
* GNU Coreutils, BusyBox, Toybox, sbase or another UNIX utilities.
* [age >= 1.1.1 - A simple, modern and secure file encryption tool.](https://github.com/FiloSottile/age)
* [xclip (optional) - Clipboard support.](https://github.com/astrand/xclip)

## Installation

```
cd page
sudo cp page /usr/local/bin
```

## Usage

Show help message:

```
page
```

First, generate a master encryption key:

```
page -g
```

Save a password:

```
page -a foo@example.com
```

Or save a password with category:

```
page -a email/foo@example.com
```

Show a password:

```
page -s foo@example.com
```

Or show a password with category:

```
page -s email/foo@example.com
```

List all passwords:

```
page -l
```

Copy a password to the clipboard:

```
page -c foo@example.com
```

Or copy a password with category to the clipboard:

```
page -c email/foo@example.com
```

Delete a password:

```
page -d foo@example.com
```

Or delete a password with category:

```
page -d email/foo@example.com
```

## References

* [pash - A simple password manager using GPG written in POSIX sh.](https://github.com/dylanaraps/pash)
* [pure sh bible - A collection of pure POSIX sh alternatives to external processes.](https://github.com/dylanaraps/pure-sh-bible)
* [IEEE - Especificación POSIX.](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html)
* [Freedesktop.org - XDG Base Directory Specification.](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html)
* [Bash Reference Manual Version 5.1](https://freakspot.net/programas/docs/bash/manual-de-referencia-de-Bash_5.1.html)
* [The Linux Documentation Project - Advanced Bash-Scripting Guide.](https://tldp.org/LDP/abs/html/)
* [IBM - Korn shell.](https://www.ibm.com/docs/en/aix/7.3?topic=shells-korn-shell)
* [ShellCheck - When using <<-, you can only indent with tabs (SC1040).](https://github.com/koalaman/shellcheck/wiki/SC1040)

## License

```
page -- A simple password manager using age written in POSIX sh.

Copyright (C) 2020-2024  Ricardo García Jiménez <ricardogj08@riseup.net>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

========================================================================

The MIT License (MIT)

Copyright (c) 2016-2019 Dylan Araps

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
